﻿using System;


namespace _10.SwitchAndMultiplies
{
    class SwitchAndMultiplies
    {
        static void Main(string[] args)
        {
            //Write a program that applies bonus scores to given scores in the range [1..9].
            //The program reads a digit as an input. If the digit is between 1 and 3, the program multiplies it by 10;
            //if it is between 4 and 6, multiplies it by 100; if it is between 7 and 9, multiplies it by 1000.
            //If it is zero or if the value is not a digit, the program must report an error.
            //Use a switch statement and at the end print the calculated new value in the console.

            int digit = 0;
            int score = 0;
            Console.WriteLine("How much digit you want to input (1-9):");
            int n = int.Parse(Console.ReadLine());
            if (n > 0 && n < 10)
            {
                Console.WriteLine("Must be digit between 1 to 9");
                for (int i = 0; i < n; i++)
                {
                    Console.Write((i+1)+".");
                    digit = int.Parse(Console.ReadLine());
                    Console.WriteLine();
                    if (digit >= 0 && digit <= 9)
                    {

                        switch (digit)
                        {
                            case 1: score+=(digit*10); break;
                            case 2: score+=(digit*10); break;
                            case 3: score+=(digit*10); break;

                            case 4: score+=(digit*100); break;
                            case 5: score+=(digit* 100); break;
                            case 6: score+=(digit* 100); break;
                            case 7: //score+=(digit* 1000); break; //may not at every line
                            case 8: //score+=(digit* 1000); break;
                            case 9: score+=(digit* 1000); break;
                            default: Console.WriteLine("ERROR!"); break;
                        }
                    }
                }
            }
            Console.WriteLine("Score is: {0}",score);
        }
    }
}